
<html> 
 
<head> 
<title>Learning WebGL &mdash; lesson 1</title> 
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> 
 
<script type="text/javascript" src="lessonJs/glMatrix-0.9.5.min.js"></script> 
<script type="text/javascript" src="lessonJs/webgl-utils.js"></script> 
 
<script id="shader-fs" type="x-shader/x-fragment"> 
    #ifdef GL_ES
    precision highp float;
    #endif
 
    varying vec4 vColor;
 
    void main(void) {
        gl_FragColor = vColor;
    }
</script> 
 
<script id="shader-vs" type="x-shader/x-vertex"> 
    attribute vec3 aVertexPosition;
    attribute vec4 aVertexColor;
 
    uniform mat4 uMVMatrix;
    uniform mat4 uPMatrix;
 
    varying vec4 vColor;
 
    void main(void) {
        gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);
        vColor = aVertexColor;
    }
</script> 
<script type="text/javascript" src="diy.js/color.js"></script>
</head> 
 
<body onload="webGLStart();"> 
    <a href="http://learningwebgl.com/blog/?p=28">&lt;&lt; Back to Lesson 1</a><br /> 
 
    <canvas id="lesson01-canvas" style="border: none;" width="500" height="500"></canvas> 
 
    <br/> 
    <a href="http://learningwebgl.com/blog/?p=28">&lt;&lt; Back to Lesson 1</a><br /> 
 
    <!-- Google Analytics stuff, please ignore - nothing to do with WebGL :-) --> 
    <script type="text/javascript"> 
        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script> 
    <script type="text/javascript"> 
        try {
            var pageTracker = _gat._getTracker("UA-2240015-5");
            pageTracker._trackPageview();
        } catch(err) {
        }
    </script> 
 
</body> 
 
</html> 